package leetcode.code0927;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution927 implements IDebug {

	public abstract int[] threeEqualParts(int[] arr);

	@Override
	public void debug1() {
		int[] r = this.threeEqualParts(HelpDebug.str2array3("[1,0,1,0,1]"));
		int[] e = HelpDebug.str2array3("[0,3]");
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		int[] r = this.threeEqualParts(HelpDebug.str2array3("[1,1,0,1,1]"));
		int[] e = HelpDebug.str2array3("[-1,-1]");
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug3() {
		// [1,0,1,0,1,1,0,1,0,1,1,0,1,0,1]
		int[] r = this.threeEqualParts(HelpDebug.str2array3("[1,0,1,0,1,1,0,1,0,1,1,0,1,0,1]"));
		int[] e = HelpDebug.str2array3("[4,10]");
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug4() {
		// [0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,1,0,1,0,1,1,0,1,0,1,0,0,0,0,0]
		int[] r = this.threeEqualParts(HelpDebug.str2array3("[0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,1,0,1,0,1,1,0,1,0,1,0,0,0,0,0]"));
		int[] e = HelpDebug.str2array3("[-1,-1]");
		HelpDebug.compare(e, r);
	}

	public void debug5() {
		// [0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,1,0,1,0,1,1,0,1,0,1,0,0,0,0,0]
		int[] r = this.threeEqualParts(HelpDebug.str2array3("[0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0]"));
		int[] e = HelpDebug.str2array3("[8,22]");
		HelpDebug.compare(e, r);
	}

}
